import { createRouter, createWebHashHistory } from 'vue-router'
import Login from '@/views/login'
import Layout from '@/views/layout'
import Category from '@/views/category'
const routes = [
  {
    path: '/login',
    component: Login
  }, {
    path: '/',
    component: Layout,
    children: [
      {
        name: 'category',
        path: 'category/:id',
        component: Category
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
